package com.xinzhi.controller;

import com.xinzhi.pojo.dto.Chengji;
import com.xinzhi.service.ChengjiService;
import com.xinzhi.service.PerformanceStateService;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class PerformanceStateController {
    @Autowired
    private PerformanceStateService performanceStateService;
    @Autowired
    private ChengjiService chengjiService;


    /**
     * 成绩申诉审核查询接口
     * @return
     */
    @GetMapping("/Appealaudit")
   public Result Appealaudit(){
        Result appealaudit = performanceStateService.Appealaudit();
        return appealaudit;
   }



    /**
     * 成绩申诉审核根据考评对象的查询接口
     * @param object
     * @return
     */
    @GetMapping("/chengji")
    public List<Chengji> chengjis(@RequestParam String object){
        return chengjiService.getChengji(object);
    }


    /**
     * 成绩申诉审核根据申诉状态查询接口
     */
    @GetMapping("/getChengjiByappeal_status")
    public List<Chengji> getChengjiByappeal_status(@RequestParam String appeal_status){
        return chengjiService.getChengjiByappeal_status(appeal_status);
    }


    /**
     * 成绩申诉审核根据年份查询接口
     */

    @GetMapping("/getChengjiByyearnumber")
    public Result getChengjiByyearnumber(@RequestParam String yearnumber){
        Result chengjiByyearnumber = chengjiService.getChengjiByyearnumber(yearnumber);
        return chengjiByyearnumber;
    }

}


